<?php $this->useJQuery() ?>

<div id="products-paging">
	<form name="paging" action="#" method="get">
		<!-- select name="sort" style="float: right;"><option>Lorem ipsum dolor</option></select -->
		<?php echo $this->paginationControl($this->paginator, 'Sliding', 'products_pagination_control.phtml'); ?>
		<span class="vspacer"></span>
		<a href="<?php echo $this->sherpaUrl()->viewBy9() ?>" class="current">View by 9 <img src="sherpa/img/paging-3x3-active.gif" alt="View by 9" width="23" height="14" /></a>
		<span class="vspacer"></span>
		<a href="<?php echo $this->sherpaUrl()->viewBy36() ?>">View by 36 <img src="sherpa/img/paging-6x6-inactive.gif" alt="View by 36" width="23" height="14" /></a>
	</form>
</div>

<div id="products-boxes">
<?php foreach($this->products AS $i=>$product): ?>
	<?php $url = $this->sherpaUrl()->productDetail($this->config('pageIdDetails'), $product->getId()) ?>
	<div class="product-box-wrapper <?php echo (($i+1)%6 == 0) ? 'last' : '' ?>">
		<div class="product-box-narrow">
			<div class="name"><a href="<?php echo $url ?>"><?php echo $product->getFullProductName() ?></a></div>
			<div class="price"><span class="currency"><?php echo $this->config('currencyCode') ?></span> <?php echo $this->price($product->getPrice()) ?>
				<?php if(!$product->emptyOldPrice()): ?>
					<span class="oldprice">statt <?php echo $this->price($product->getOldPrice()) ?></span>
				<?php endif; ?>
			</div>
			<div class="image"><a href="<?php echo $url ?>"><img id="image-product-<?php echo $product->getId() ?>" src="<?php echo $this->productImagePath('m') ?><?php echo $product->getImageFile() ?>" alt="<?php echo $product->getFullProductName() ?>" width="91" /></a></div>
		</div>
	</div>
<?php endforeach; ?>
</div>
